class Solution {//leetcode377——组合总和V
public:
    int combinationSum4(vector<int>& nums, int target) {
        vector<double> dp(target+1);
        dp[0]=1;
        for(int i=0;i<target+1;i++){
            for(auto e:nums){
                if(i-e>=0) dp[i]+=dp[i-e];
            }
        }
        return dp[target];
    }
};